package com.acminds.acuteauto.persistence.entities;

// Generated May 13, 2012 8:21:43 PM by Hibernate Tools 3.4.0.CR1

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.OneToMany;

import com.acminds.acuteauto.persistence.dto.*;

/**
 * Make generated by customhbm2java
 */
@MappedSuperclass
public abstract class AbstractMake extends
		com.acminds.acuteauto.persistence.BaseDTO implements
		java.io.Serializable {

	private static final long serialVersionUID = 1L;

	private Integer makeId;
	private String name;
	private String description;
	private int yearStart;
	private Integer yearEnd;
	private List<Feature> features = new ArrayList<Feature>(0);
	private List<Model> models = new ArrayList<Model>(0);
	private List<Vehicle> vehicles = new ArrayList<Vehicle>(0);
	private List<TradeinInfo> tradeinInfos = new ArrayList<TradeinInfo>(0);

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "MAKE_ID", unique = true, nullable = false)
	public Integer getMakeId() {
		return this.makeId;
	}

	public void setMakeId(Integer makeId) {
		this.makeId = makeId;
	}

	@Column(name = "NAME", nullable = false, length = 60)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "DESCRIPTION", length = 100)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "YEAR_START", nullable = false)
	public int getYearStart() {
		return this.yearStart;
	}

	public void setYearStart(int yearStart) {
		this.yearStart = yearStart;
	}

	@Column(name = "YEAR_END")
	public Integer getYearEnd() {
		return this.yearEnd;
	}

	public void setYearEnd(Integer yearEnd) {
		this.yearEnd = yearEnd;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "make")
	public List<Feature> getFeatures() {
		return this.features;
	}

	public void setFeatures(List<Feature> features) {
		this.features = features;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "make", cascade = {CascadeType.ALL})
	public List<Model> getModels() {
		return this.models;
	}

	public void setModels(List<Model> models) {
		this.models = models;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "make")
	public List<Vehicle> getVehicles() {
		return this.vehicles;
	}

	public void setVehicles(List<Vehicle> vehicles) {
		this.vehicles = vehicles;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "make")
	public List<TradeinInfo> getTradeinInfos() {
		return this.tradeinInfos;
	}

	public void setTradeinInfos(List<TradeinInfo> tradeinInfos) {
		this.tradeinInfos = tradeinInfos;
	}

}
